********************************************************************************
*    A matter of content. Overcoming the gender gap in political knowledge,    *
*    expression of knowledge, and interest.                                    *
*    Silvia Keeling                                                            * 
*    Replication material for Tables 3;4;5.                                    *
********************************************************************************


* Use the dataset after applying recodes

use "overcoming the gender gap dataset.dta" 

********************************************************************************
*  TABLE 3
********************************************************************************

drop if female==.

* institutional figures
replace fico=0 if fico==2
la de fico 1 "right" 0 "else", replace
la val fico fico
replace ficob=0 if ficob==2
la val ficob fico
replace casellati=0 if casellati==2
la val casellati fico
replace casellatib=0 if casellatib==2
la val casellatib fico

* benefit
replace reddito=0 if reddito==2
la val reddito fico
replace redditob=0 if redditob==2
la val redditob fico
replace maternità=0 if maternità==2
la val maternità fico
replace maternitàb=0 if maternitàb==2
la val maternitàb fico

* TTEST
* POLITICAL FIGURES
* fico
by sex, sort: egen MEAN1 = mean(fico) if treatment==0 
by sex, sort: egen sd1 = sd(fico) if treatment==0 
fre MEAN1 sd1
ttesti 70 .4571429 .493804 29 .6206896  .5017567

by sex, sort: egen MEAN1b = mean(ficob) if treatment==1
by sex, sort: egen sd1b = sd(ficob) if treatment==1
fre MEAN1b sd1b
ttesti 66 .5 .5038314 34 .8823529 .327035 

*GG difference
ttesti 99 -.1635467  .1095595 100 -.3823529    .0954354
 
* casellati
by sex, sort: egen MEAN2 = mean(casellati) if treatment==0 
by sex, sort: egen sd2 = sd(casellati) if treatment==0 
fre MEAN2 sd2
ttesti 70 .3857143 .4902782 29 .5517241 .5061202 
 
by sex, sort: egen MEAN2b = mean(casellatib) if treatment==1
by sex, sort: egen sd2b = sd(casellatib) if treatment==1
fre MEAN2b sd2b
ttesti 66 .5 .5038314 34 .7941176 .4104256 

*GG difference
ttesti 99 -.1660098    .1092924 100 -.2941176    .1001536

* POLICY-SPECIFIC
* reddito
by sex, sort: egen MEAN3 = mean(reddito) if treatment==0 
by sex, sort: egen sd3 = sd(reddito) if treatment==0 
fre MEAN3 sd3
ttesti 70 .1714286 .3796043  29 .2758621 .4548588
 
by sex, sort: egen MEAN3b = mean(redditob) if treatment==1 
by sex, sort: egen sd3b = sd(redditob) if treatment==1 
fre MEAN3b sd3b
ttesti 66 .2575758 .4406501 34 .2352941 .4305615

*GG difference 
ttesti 99 -.1044335   .0889468 100 .0222817    .0923097 
 
* maternità
by sex, sort: egen MEAN4 = mean(maternità) if treatment==0 
by sex, sort: egen sd4 = sd(maternità) if treatment==0 
fre MEAN4 sd4
ttesti 70 .3285714 .4730851  29 .2068966 .4122508

by sex, sort: egen MEAN4b = mean(maternitàb) if treatment==1 
by sex, sort: egen sd4b = sd(maternitàb) if treatment==1 
fre MEAN4b sd4b
ttesti 66 .4242424 .4980147 34 .2352941 .4305615

*GG difference 
ttesti 99 .1216748    .1007802 100 .1889483    .1005615



********************************************************************************
*  TABLE 4
********************************************************************************

gen trattamento_c=.
replace trattamento_c=1 if t_m5s==1 | t_m5s==2 | ///
 t_primarep==1 | t_primarep==2 | t_primarep==3 | ///
 t_donne==1 | t_donne==2 | ///
 t_divorzio==1 | t_divorzio==2
replace trattamento_c=0 if t_m5s==.

* RECODE
replace m5s=0 if m5s>=2
la val m5s fico
replace t_m5s=0 if t_m5s==2 
la val t_m5s fico
replace donne=0 if donne>=2
la val donne fico
replace t_donne=0 if t_donne==2 
la val t_donne fico
replace primarep=0 if primarep>=2
la val primarep fico
replace t_primarep=0 if t_primarep>=2 
la val t_primarep fico
replace divorzio=0 if divorzio>=2
la val divorzio fico
replace t_divorzio=0 if t_divorzio==2 
la val t_divorzio fico

* % PARLIAMENT 
* 5stelle
by sex, sort: egen MEAN5 = mean(m5s) if trattamento_c==0 
by sex, sort: egen sd5 = sd(m5s) if trattamento_c==0 
fre MEAN5 sd5
ttesti 78 .525641 .5025741 27 .6666667 .4803845

by sex, sort: egen MEAN5b = mean(t_m5s) if trattamento_c==1
by sex, sort: egen sd5b = sd(t_m5s) if trattamento_c==1
fre MEAN5b sd5b
ttesti 58 .6206896 .4894532 36 .75 .439155 

*GG difference 
ttesti 105  -.1410257    .110989  36 -.1293104    .0999252

* donne
by sex, sort: egen MEAN6 = mean(donne) if trattamento_c==0 
by sex, sort: egen sd6 = sd(donne) if trattamento_c==0 
fre MEAN6 sd6
ttesti 78 .2820513 .4529108 27 .3333333 .4803845

by sex, sort: egen MEAN6b = mean(t_donne) if trattamento_c==1
by sex, sort: egen sd6b = sd(t_donne) if trattamento_c==1
fre MEAN6b sd6b
ttesti 58 .3793103 .4894532 36 .3611111 .4871361
 
*GG difference 
ttesti 105 -.051282    .1027127 94 .0181992     .103664

* primarep
by sex, sort: egen MEAN7 = mean(primarep) if trattamento_c==0 
by sex, sort: egen sd7 = sd(primarep) if trattamento_c==0 
fre MEAN7 sd7
ttesti 78 .5 .5032363 27 .6296296 .4921029

by sex, sort: egen MEAN7b = mean(t_primarep) if trattamento_c==1
by sex, sort: egen sd7b = sd(t_primarep) if trattamento_c==1
fre MEAN7b sd7b
ttesti 58 .4655173 .4013865  36 .8055556 .503166

*GG difference 
ttesti 105 -.1296296    .1117443  94  -.3400383    .0939674 


* divorzio
by sex, sort: egen MEAN8 = mean(divorzio) if trattamento_c==0 
by sex, sort: egen sd8 = sd(divorzio) if trattamento_c==0 
fre MEAN8 sd8
ttesti 78 .7307692 .4464311 27 .7407407 .4465761

by sex, sort: egen MEAN8b = mean(t_divorzio) if trattamento_c==1
by sex, sort: egen sd8b = sd(t_divorzio) if trattamento_c==1
fre MEAN8b sd8b
ttesti 58 .7931035  .4086186  36 .7222222 .4542568

*GG difference 
ttesti 105 .0099715    .0996909 94 -.0708813    .0905056 



********************************************************************************
*  TABLE 5
********************************************************************************

gen interest=Q8
replace interest=3 if interest==4
la de interest 1 "Very interested" 2 "Fairly interested" 3 "Not interested"
la val interest interest

* recode variable of treatment
tab FL_25_DO_interest
gen trattamento_int=. 
replace trattamento_int=0 if FL_25_DO_interest==1
replace trattamento_int=1 if FL_25_DO_interest==2

bys trattamento_int: tab interest female, chi col 

gen interest2=interest
replace interest2=0 if interest>=2

by female, sort: egen mean_int = mean(interest2) if trattamento_int==0
by female, sort: egen sd_int = sd(interest2) if trattamento_int==0
fre mean_int sd_int
ttesti 29 .5172414 .5085476 61 .0819672 .2765913

by female, sort: egen mean_int2 = mean(interest2) if trattamento_int==1
by female, sort: egen sd_int2 = sd(interest2) if trattamento_int==1
fre mean_int2 sd_int2
ttesti 29 .2647059 .4478111 75 .08  .2731201
*GG difference
ttesti 90 .4352742    .0827059 104 .1847059     .072249 

